package controller

import (
	"gitee.com/man0sions/IdCreator/core"
	"github.com/gin-gonic/gin"
)

type Api struct {
}

func (api *Api) IdCreator(ctx *gin.Context) {
	//time.Sleep(time.Millisecond * 900)
	id := core.GFlake.Node.Generate().String()
	ctx.JSON(200, core.ResponseOk(id))
}

func (api *Api) Test(ctx *gin.Context) {
	//time.Sleep(time.Millisecond * 900)

	ctx.JSON(200, 1)
}
